bitkeeper revision 1.1389.1.13 (42722e78tJ9dMvMOlJBiS68RNPTvfw)
[PATCH] [patch] pgtable.c cleanups
Hi guys,
The new mm_(un)pin stuff is certainly a nice optimization.
But can we take care a bit more about coding style issues
and write code not *that* hackish please? Casts, code
duplication, "unsigned long" for page table entries *again*.
And a few more variables also make the code more readable
(and gcc should be clever enougth that this isn't a
performance hit). We want to have that merged some day in
mainline, don't we?
The patch below cleans up the pin/unpin code in pgtable.c
I've created two helper functions to factor out common code,
the page table walk is basically the same for both pin and
unpin, it's just different page flags. Also fixed up the
walk code to correcly walk through all 4 levels linux has,
so it works correctly for the PAE case. For x86_64 it
should work fine as well (untested though).
please apply,
Gerd